﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MiniBug.Entity.Bug>" %>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	New Bug
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="CustomScript" runat="server">
<script type="text/javascript" language="javascript" src="../../Scripts/jquery.MultiFile.js"></script>
<script type="text/javascript" language="javascript" src="../../Scripts/jquery.form.js"></script>
<script type="text/javascript" language="javascript" src="../../Scripts/jquery.MetaData.js"></script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

   <% using (Html.BeginForm("Create", "Bug", FormMethod.Post, new {@enctype = "multipart/form-data" }))
	  {%>
		<%: Html.ValidationSummary(true)%>

		<fieldset>
			<legend class ="bug-number">
				<%: ViewData["BugNumber"].ToString()%>
			</legend>                     
			<div class="editor-label">
				<label><%= ResourceViews.BugStrings.Title%></label>
			</div>
			<div class="editor-field">
				<%: Html.TextBoxFor(model => model.Title, new { @maxlenght = "150", @autocomplete = "off" })%>
				<%: Html.ValidationMessageFor(model => model.Title)%>
			</div>
			
			<div class="editor-label">
				<%: Html.Label(ResourceViews.BugStrings.FieldDescription)%>
			</div>
			<div class="editor-field">
				<%: Html.TextAreaFor(model => model.Description)%>
				<%: Html.ValidationMessageFor(model => model.Description)%>
			</div>
			
			<div class="editor-label">
				<%:  Html.Label(ResourceViews.BugStrings.FieldAssignedTo)%>
			</div>
			<div class="dropdownlist">
				<%: Html.DropDownList("AssignedTo")%>
				<%: Html.ValidationMessageFor(model => model.AssignedTo)%>
			</div>
			
			<div class="editor-label">
				<%:  Html.Label(ResourceViews.BugStrings.FieldProject)%>
			</div>
			<div class="dropdownlist">
				<%: Html.DropDownList("ProjectList")%>
				<%: Html.ValidationMessageFor(model => model.Project)%>
			</div>

            <div class="editor-label">
				<%:  Html.Label(ResourceViews.BugStrings.FieldDueTo)%>
			</div>
			<div class="editor-field">
				<%: Html.EditorFor(model => model.DueDate)%>
			</div>
			
			<div class="editor-label">
				<%:  Html.Label(ResourceViews.BugStrings.FieldCategory)%>
			</div>
			<div class="dropdownlist">
			   <%: Html.DropDownList("CategoryList")%>
				<%: Html.ValidationMessageFor(model => model.idCategory)%>
			</div>
			
			<div class="editor-label">
				<%:  Html.Label(ResourceViews.BugStrings.FieldStatus)%>
			</div>
			<div class="dropdownlist">
				<%: Html.DropDownList("StatusList", null, new { @disabled = "disabled" })%>
				<%: Html.ValidationMessageFor(model => model.Status)%>
			</div>
			
			<div class="editor-label">
				<%:  Html.Label(ResourceViews.BugStrings.FieldPriority)%>
			</div>
			<div class="dropdownlist">
				<%: Html.DropDownList("PriorityList")%>
				<%: Html.ValidationMessageFor(model => model.Priority)%>
			</div>
			
			<div class="editor-label">
				<%:  Html.Label(ResourceViews.BugStrings.FieldOwner)%>
			</div>
			<div class="dropdownlist">
				<%: Html.DropDownList("UserList", null, new { @disabled = "disabled" })%>
				<%: Html.ValidationMessageFor(model => model.Owner)%>
			</div>

			<div class="editor-label">
				<%:  Html.Label(ResourceViews.BugStrings.FieldTags)%>
			</div>
			<div class="editor-field">
				<%: Html.TextBoxFor(model => model.Tags, new { @title=ResourceViews.BugStrings.TipTags})%>
				<%: Html.ValidationMessageFor(model => model.Tags)%>
			</div>

			<div class="editor-label">
				<%:  Html.Label("Attachments")%>
			</div>  
			 <div class="editor-field">          
				<input type="file" value = "Attach a file" class="multi" id="attachments" name="attachments"/>   
			 </div>   
						  
			<p>
				<input type="submit" value="OK" />
			</p>
		</fieldset>

	<% } %>

	<div>
		<%: Html.ActionLink("Back to List", "Index") %>
	</div>

</asp:Content>

